package accountinfo.dao;

import java.util.ArrayList;
import java.util.HashMap;
import accountinfo.dao.AccountDetail;
import accountinfo.dao.AddressInfo;

public class AccountDetailsDAO {

	public static HashMap<String, ArrayList<AccountDetail>> cardAccounts;

	static {
		createAccounts();
	}

	/*
	Account Detail Definition
	String cardNO;	String lastStatementDT;	String titleDS;	String firstNM;	String lastNM;	String basicCardIN;
	String cardSinceDT;	String emailAddress;	String birthDT;	String memberSinceDT;	String vipStatusIN;	
	AddressInfo address; AddressInfo addres2;
	*/
	
	public static void createAccounts() {

		// Account with Basic + 3 Supps
		ArrayList<AccountDetail> account_37428814677 = new ArrayList<AccountDetail>();
		account_37428814677.add(new AccountDetail("374288146771000",
				"2012-01-02", "MR", "STEPHEN", "HAWKING", "true",
				"2011-11-01", "blackholestevie@universe.com", "1977-11-18", "2011-11-01", "false",
				new AddressInfo("DEFAULT", "GBR", "BN2 1HW", "29 Sydney Street", null,
						null, "BRIGHTON"), new AddressInfo("ALTERNATE", "GBR", "W1 1SC", "Victoria Grove", null,
								null, "LONDON")));
		account_37428814677.add(new AccountDetail("374288146771000",
				"2012-01-02", "MRS", "STEPHANIE", "HAWKING", "false",
				"2011-11-01", "stephenswife@andromeda.com", "1979-02-15", "2011-11-01", "false",
				new AddressInfo("DEFAULT", "GBR", "BN1 9FG", "29 Grand Avenue", "Flat 2",
						null, "BRIGHTON"),null));
		account_37428814677.add(new AccountDetail("374288146771000",
				"2012-01-02", "MR", "STEVIE JR", "HAWKING", "false",
				"2011-11-01", "lilstevie@universe.com", "1995-06-19", "2011-11-01", "false",
				new AddressInfo("DEFAULT", "GBR", "BN2 1HW", "29 Sydney Street", null,
						null, "BRIGHTON"),null));
		account_37428814677.add(new AccountDetail("374288146771000",
				"2012-01-02", "MS", "STEPHIE JR", "HAWKING", "false",
				"2011-11-01", "lilstevette@andromeda.com", "1999-10-22", "2011-11-01", "false",
				new AddressInfo("DEFAULT", "GBR", "BN1 9FG", "29 Grand Avenue", "Flat 2",
						null, "BRIGHTON"),null));
		
		// Account with Basic + 1 Supp
		ArrayList<AccountDetail> account_37426614677 = new ArrayList<AccountDetail>();
		account_37426614677.add(new AccountDetail("374266146771000",
				"2012-01-02", "MR", "FRANCIS", "CRICK", "true",
				"2011-11-01", "acgtacgt@helix.com", "1977-11-18", "2011-11-01", "true",
				new AddressInfo("DEFAULT", "GBR", "BN2 1HJ", "34 Southover Street", null,
						null, "BRIGHTON"), new AddressInfo("ALTERNATE", "USA", "NY-12345", "New York Genome Institute", null,
								null, "NEW YORK")));
		account_37426614677.add(new AccountDetail("374266146771000",
				"2012-01-02", "MR", "JAMES", "WATSON", "false",
				"2011-11-01", "dnaboy@helix.com", "1979-02-15", "2011-11-01", "false",
				new AddressInfo("DEFAULT", "GBR", "BN2 1HJ", "34 Southover Street", null,
						null, "BRIGHTON"),null));
		
		
		// Accounts with Basic + 0 Supps
				ArrayList<AccountDetail> account_37410014622 = new ArrayList<AccountDetail>();
				account_37410014622.add(new AccountDetail("374100146221000",
						"2012-11-01", "MS", "MARIE", "CURIE", "true",
						"2012-09-01", "glowingmarie@radium.com", "1950-02-10", "1990-07-01", "false",
						new AddressInfo("DEFAULT", "GBR", "BN2 1DG", "4A Chichester Terrace", null,
								null, "BRIGHTON"),null));
				
				ArrayList<AccountDetail> account_37469206715 = new ArrayList<AccountDetail>();
				account_37469206715.add(new AccountDetail("374692067151003",
						"2012-01-02", "MR", "PAUL", "DIRAC", "true", 
						"2006-01-09", "strangequark@QED.com" , "1960-05-10", "2006-01-09", "false",	
						new AddressInfo("DEFAULT", "GBR", "BN1 3AQ", " 99 Seagull Mansions", "North Road", 
								null, "BRIGHTON"), 
									new AddressInfo("ALTERNATE", "GBR", "MN1 123", "Box 2", null, null, "MANCHESTER")));

				ArrayList<AccountDetail> account_37670100154 = new ArrayList<AccountDetail>();
				account_37670100154.add(new AccountDetail("376701001541001",
						"2011-12-16", "MR", "RICHARD", "FEYNMAN ", "true", 
						"2010-12-01", "bongoRich@tuva.com", "1968-05-13", "2010-12-01", "true",
						new AddressInfo("DEFAULT", "GBR", "BN2 4FG", "20 Worccester Court", 
								"Windlesham Avenue", null, "BRIGHTON"), null));
				
				ArrayList<AccountDetail> account_37328026910 = new ArrayList<AccountDetail>();
				account_37328026910.add(new AccountDetail("373280269101066",
						"2012-01-06", "MRS", "JOCELYN", "BELL BURNELL", "FALSE", "2009-06-01", "littlegreenmen@pulsar.com",
						" ", "2005-05-24", "false",	
						new AddressInfo("DEFAULT", "GBR", "BN2 9RS", "74 Sussex Square", null, 
								null, "BRIGHTON"), 
								new AddressInfo("ALTERNATE", "GBR", "EC21 6NM", "Institute Of Physics", null, null, "LONDON")));
					
				ArrayList<AccountDetail> account_37606000023 = new ArrayList<AccountDetail>();
				account_37606000023.add(new AccountDetail("376060000231001",
						"2011-04-07", "MR", "WERNER", "HEISENBERG", "true", 
						"2010-02-01", "thecatisdead@uncertainly.com", "1960-03-26", "2001-01-01", "FALSE",	
						new AddressInfo("DEFAULT", "GBR", "BN3 5TH", "56 Waterloo Street", 
								null, null, "BRIGHTON"), 
								new AddressInfo("ALTERNATE", "GBR", "Flat 39", "35 Victoria Road", null, null, "LONDON")));

				ArrayList<AccountDetail> account_37693030936 = new ArrayList<AccountDetail>();
				account_37693030936.add(new AccountDetail("376930309362006",
						"2011-12-15", "MR", "JAMES", "MAXWELL", "true", 
						"2010-01-22", "magnetciJim@electro.com", "1961-12-03", "2007-01-01", "true",
						new AddressInfo("DEFAULT", "GBR", "BN2 1DG", "3 Portland Place", "Kemptown", 
								null, "Brighton"), null));

				ArrayList<AccountDetail> account_37498803694 = new ArrayList<AccountDetail>();
				account_37498803694.add(new AccountDetail("374988036941114",
						"2011-06-27", "MR", "CARL", "SAGAN", "false", "2010-11-11", "palebluedot@sagan.com", 
						"1970-10-10", "2010-11-10", "true",	
						new AddressInfo("DEFAULT", "GBR", "BN2 7YH", "56 Queens Park Road", null, 
								null, "BRIGHTON"), 
								new AddressInfo("ALTERNATE", "GBR", "Street 1", "Box 2", null, null, "LONDON")));

				ArrayList<AccountDetail> account_37466000193 = new ArrayList<AccountDetail>();
				account_37466000193.add(new AccountDetail("374660001931004",
						"2012-01-02", "MISS  ", "ROSALIND", "FRANKLIN ", "true", 
						"2011-02-01", "xraychick@crystallography.com", "1971-06-23", "2008-01-01", "false",	
						new AddressInfo("DEFAULT", "GBR", "BN2 5GW", "Massive Mansion", "Lewes Crescent", 
								null, "BRIGHTON"), 
								new AddressInfo("ALTERNATE", "FRA", "Le Massif Mansion", "Rue De La Seine", null, null, "PARIS")));

				ArrayList<AccountDetail> account_37538000074 = new ArrayList<AccountDetail>();
				account_37538000074.add(new AccountDetail("375380000742026",
						"2012-01-02", "MR", "ALBERT", "EINSTEIN ", "true", 
						"2000-06-14", "thegeneral@specialrelativity.com", "1950-06-23", "1983-06-01", "true",	
						new AddressInfo("DEFAULT", "GBR", "BN1 4AP", "385 The Drive", null, 
								null, "BRIGHTON"), null));

				

		cardAccounts = new HashMap<String, ArrayList<AccountDetail>>();
		cardAccounts.put("37428814677", account_37428814677);
		cardAccounts.put("37426614677", account_37426614677);
		cardAccounts.put("37410014622", account_37410014622);
		cardAccounts.put("37469206715", account_37469206715);
		cardAccounts.put("37670100154", account_37670100154);
		cardAccounts.put("37328026910", account_37328026910);
		cardAccounts.put("37606000023", account_37606000023);
		cardAccounts.put("37693030936", account_37693030936);
		cardAccounts.put("37498803694", account_37498803694);
		cardAccounts.put("37466000193", account_37466000193);
		cardAccounts.put("37538000074", account_37538000074);

	}

	public static ArrayList<AccountDetail> getAccountDetails(String cardNO) {
		ArrayList<AccountDetail> list = cardAccounts.get(cardNO);
		return list;
	}
}
